/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ronin.actor2d;
import ronin.ai.*;

/**
 * Bots are prebuilt actors who can take action thru a finate state machine.
 * @author yardigan
 */
public class Bot extends StaticActor{
    
    // think of this is a brain
    StateMachine fsm;
    
    // creates a 'dumb' bot
    public Bot(StaticActorGroup group)
    {
        super(group);
        fsm = new StateMachine(this);
        fsm.setCurrentState(null);
        fsm.setGlobalState(null);
        fsm.setPreviousState(null);
    }
    
    // creates a 'thinking' bot
    public Bot( StaticActorGroup group, 
                State currentState, 
                State globalState, 
                State previousState)
    {
       super(group);
       fsm = new StateMachine(this);
       fsm.setCurrentState(currentState);
       fsm.setGlobalState(globalState);
       fsm.setPreviousState(previousState);
    }
    
    public void update()
    {
        super.update();
        fsm.update();
    }
    
    public StateMachine getFSM(){ return fsm; }
}
